import {createRouter,createWebHistory} from "vue-router"


const routes = [
    {
        path: '/',
        redirect: "/install/app/xxx/index"
    },
    {
        path: "/install/app/xxx/index",
        name: "index",
        component: ()=>import("../view/index.vue"),
        meta: {
            keepAlive: true
        }
    },
    {
        path: '/install/app/xxx/founder', 
        name: 'customer',
        component: ()=>import("../view/customer.vue"),
        children: [
            {
                path: "micro/:page*",
                name: "customer-micro",
                component: ()=>import("../components/micro.vue")
            },
            {
                path: "iframe/:page*",
                name: "customer-iframe",
                component: ()=>import("../components/iframe.vue")
            }
        ]
    }
]

const router = createRouter({
    history: createWebHistory(window.__MICRO_APP_BASE_ROUTE__ || process.env.BASE_URL),
    routes
});

export default router;
